In an image forming apparatus, a recording material feeding unit (hereinafter referred to as a paper-feed cassette), which is a storage unit that stores a recording material, or the like feeds recording sheets. The image forming apparatus has a function of detecting conveying time, which is time until the recording material reaches a position along a conveying path after the paper-feed cassette begins to feed the recording material. After detecting the conveying time, the image forming apparatus controls a speed at which the recording material is conveyed in order to adjust a timing at which an image is formed, and determines the length of the recording material in a feeding direction and the conveying state of the recording material. For example, in PTL 1, detection of the conveying time and control of the speed at which the recording material is conveyed are described. In PTL 2, detection of the length of the recording material based on the conveying time is described.